{% load i18n ifsetting_tag account_tags openid_tags %}
{% if user.is_authenticated %}
    {% ifopenid %}<img src="{{ STATIC_URL }}images/openid-icon.png" alt="Logged in with OpenID" />{% endifopenid %}<b>{% user_display user %}</b>
    |
    <a href="{% url acct_email %}">{% trans "Account" %}</a>
    |
    {% if user.is_staff %}
        <a href="{% url admin:index %}">{% trans "Admin" %}</a>
        |
    {% endif %}
    <a href="{% if request.openid %}/openid/logout/?next={% url acct_logout %}{% else %}{% url acct_logout %}{% endif %}">{% trans "Logout" %}</a>
{% else %}
    {% url acct_login as acct_login_url %}
    {% url acct_signup as acct_signup_url %}
    {% ifsetting ACCOUNT_OPEN_SIGNUP %}
        {% blocktrans %}<a href="{{ acct_login_url }}">Log in</a> or <a href="{{ acct_signup_url }}">Sign Up</a>{% endblocktrans %}
    {% else %}
        {% blocktrans %}<a href="{{ acct_login_url }}">Log in</a>{% endblocktrans %}
    {% endifsetting %}
{% endif %}
